package com.usian.controller;

import com.usian.pojo.User;
import com.usian.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserController {
    @Autowired
    private UserService userService;
    @ResponseBody
    public String insertUser(){
        User user = new User();
        user.setName("斩杀q");
        user.setAge(121);
        user.setAddress("河北1");
        user.setPwd(1231);
        userService.addUser(user);
        return "保存成功";
    }
}
